-
-
Notifications
You must be signed in to change notification settings - Fork 611
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add CryptoApi.encryptToDeviceMessages() and deprecate Crypto.encryptAndSendToDevices() #4380
Conversation
Deprecate Crypto. encryptAndSendToDevices and MatrixClient. encryptAndSendToDevices
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like the right general direction to me
Well, that means that there are Olm Sessions already established for all the devices that the rust layer knows about. In this case, it probably means that the rust layer doesn't know about any of the target user's devices. We only fetch the device list when we are told by the homeserver that our cached device list for a given user might be outdated. And that only happens if we share at least one room with the offending user. (Is that likely to be a problem in practice, for this application?) Try something like: const syncResponder = new SyncResponder(homeserverUrl);
syncResponder.sendOrQueueSyncResponse(getSyncResponse([testData.BOB_TEST_USER_ID]));
await syncPromise(aliceClient); I think that will probably do the job, though you might have to do something else to trigger the |
Thanks, @richvdh. I think this is now ready for re-review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…ndSendToDevices() (matrix-org#4380) * Add CryptoApi. encryptToDeviceMessages Deprecate Crypto. encryptAndSendToDevices and MatrixClient. encryptAndSendToDevices * Overload MatrixClient. encryptAndSendToDevices instead of deprecating * Revert "Overload MatrixClient. encryptAndSendToDevices instead of deprecating" This reverts commit 6a0d8e2. * Feedback from code review * Use temporary pre-release build of @matrix-org/matrix-sdk-crypto-wasm * Deduplicate user IDs * Test for RustCrypto implementation * Use ensureSessionsForUsers() * Encrypt to-device messages in parallel * Use release version of matrix-sdk-crypto-wasm * Upgrade matrix-sdk-crypto-wasm to v8 * Sync with develop * Add test for olmlib CryptoApi * Fix link * Feedback from review * Move libolm implementation to better place in file * FIx doc * Integration test * Make sure test device is known to client * Feedback from review
Fixes #3304
Depends on matrix-org/matrix-rust-sdk-crypto-wasm#140 and #4396
Checklist
public
/exported
symbols have accurate TSDoc documentation.